package com.hy.service;

import com.hy.Result.ResponseResult;
import com.hy.mapper.SetMealMapper;
import com.hy.pojo.SetMeal.SetMeal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SetMealServiceImpl implements SetMealService {
    @Autowired
    private SetMealMapper setMealMapper;

    //客户端套餐查询
    @Override
    public ResponseResult getAllSetMeal() {
        List<SetMeal> setMeals = setMealMapper.selectList(null);
        return ResponseResult.okResult(200, "套餐查询成功", setMeals);
    }

    //根据套餐id查询检查组检查项
    @Override
    public ResponseResult getCheckGroupItemBySetmealId(Integer setmealId) {
        SetMeal checkGroupItemBySetmealId = setMealMapper.getCheckGroupItemBySetmealId(setmealId);
        return ResponseResult.okResult(200, "根据套餐id 查询检查组 检查项", checkGroupItemBySetmealId);
    }
}
